Optimal. Leaf size=74 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} (a+b)^{3/2} d}-\frac {\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3265, 205, 214}
\begin {gather*} -\frac {\cos (c+d x)}{2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} d (a+b)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 214
Rule 3265
Rubi steps
\begin {align*} \int \frac {\sin (c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx &=-\frac {\text {Subst}\left (\int \frac {1}{\left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 (a+b) d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} (a+b)^{3/2} d}-\frac {\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.22, size = 149, normalized size = 2.01 \begin {gather*} \frac {\frac {\tan ^{-1}\left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {-a-b} \sqrt {b}}+\frac {\tan ^{-1}\left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {-a-b} \sqrt {b}}-\frac {2 \cos (c+d x)}{2 a+b-b \cos (2 (c+d x))}}{2 (a+b) d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 65, normalized size = 0.88
method | result | size |
derivativedivides | \(\frac {-\frac {\cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}-\frac {\arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}}{d}\) | \(65\) |
default | \(\frac {-\frac {\cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}-\frac {\arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}}{d}\) | \(65\) |
risch | \(\frac {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}}{\left (a +b \right ) d \left (b \,{\mathrm e}^{4 i \left (d x +c \right )}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}+\frac {i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d}-\frac {i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d}\) | \(193\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 98, normalized size = 1.32 \begin {gather*} \frac {\frac {2 \, \cos \left (d x + c\right )}{{\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} - 2 \, a b - b^{2}} + \frac {\log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} {\left (a + b\right )}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 282, normalized size = 3.81 \begin {gather*} \left [\frac {{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {a b + b^{2}} \log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) + 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{4 \, {\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}, \frac {{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) + {\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{2 \, {\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 79, normalized size = 1.07 \begin {gather*} \frac {\arctan \left (\frac {b \cos \left (d x + c\right )}{\sqrt {-a b - b^{2}}}\right )}{2 \, \sqrt {-a b - b^{2}} {\left (a + b\right )} d} + \frac {\cos \left (d x + c\right )}{2 \, {\left (b \cos \left (d x + c\right )^{2} - a - b\right )} {\left (a + b\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 62, normalized size = 0.84 \begin {gather*} -\frac {\cos \left (c+d\,x\right )}{2\,d\,\left (a+b\right )\,\left (-b\,{\cos \left (c+d\,x\right )}^2+a+b\right )}-\frac {\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )}{2\,\sqrt {b}\,d\,{\left (a+b\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________